
#include "Concurrent/ScopedLock.hpp"

namespace My
{
    ScopedLock::ScopedLock(Mutex& mutex)
        : m_Mutex(mutex)
    {
        m_Mutex.Lock();
    }

    ScopedLock::~ScopedLock()
    {
        m_Mutex.Unlock();
    }

    Mutex& ScopedLock::GetMutex() const
    {
        return m_Mutex;
    }
}
